import React,{Component} from 'react'
import {Route,Link} from 'react-router-dom'
export default class OldSchoolMenuLink extends Component{
    render(){
        const {label,to,activeOnlyWhenExact} = this.props
        return(
            <Route path={to} exact={activeOnlyWhenExact} children={({match})=>(
                    <div className={match?'active':''}>
                        {match?'>':''}<Link to={to}>{label}</Link>
                    </div>
                )}/>
        )
    }
}